// 加载受控文档配置文件
var configMenuJSON = 'config/menu.json';
$.getJSON(configMenuJSON, function (data) {
    var htmldata = '<li><a class="active-menu waves-effect waves-dark" href="index.html"><i class="fa fa-dashboard"></i> 总览</a></li>';
    $.each(data,function (i, item) {
        htmldata +=  ' <li class="">'
                + ' <a href="' + item.url + '" class="waves-effect waves-dark"><i class="' + item.class +'"></i> ' + item.title +'</span></a>';
                // + ' <a href="#" class="waves-effect waves-dark"><i class="' + item.class +'"></i> ' + item.title +'<span class="fa arrow"></span></a>';
        // if(item.data.length > 0) {
        //     htmldata += '<ul class="nav nav-second-level collapse">';
        //     $.each(item.data,function (k, itemData) {
        //         htmldata +=  '<li><a class="waves-effect waves-dark" href="#">' + itemData.title + '</a></li> '
        //     })
        //     htmldata += '</ul>'
        // }
        htmldata +=  '</li>';
    })
    htmldata +=
    '<li>' +
        '<a href="#" class="waves-effect waves-dark">' +
            '<i class="fa fa-gears"></i> 管理与支持<span class="fa arrow"></span>' +
        '</a>' +
        '<ul class="nav nav-second-level">' +
            '<li> <a  class="waves-effect waves-dark" href="fees.html"><i class="fa  fa-table"></i> 云服务器分配情况</a> </li>' +
            '<li> <a  class="waves-effect waves-dark" href="from.html"><i class="fa fa-edit"></i>云服务器申请单</a> </li>' +
            '<li> <a  class="waves-effect waves-dark" href="#"><i class="fa fa-folder-open"></i>SVN申请</a> </li>' +
            '<li> <a  class="waves-effect waves-dark" href="#"><i class="fa fa-bar-chart-o"></i>SVN使用统计</a> </li>' +
        '</ul>' +
    '</li>';
    $("#main-menu").html(htmldata);
})

